home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / www-talk.9301-9306.Z / www-talk.9301-9306 / text1221.txt < prev    next >
Encoding:
Text File  |  1995-04-24  |  1.2 KB  |  33 lines

  1. If I'm in the middle of sending an HTML document and I get a server error
  2. how should this be handled? The problem is when we have already generated
  3. the HTTP status line and the mime headers and sent part of the document
  4. before we know about the error.
  5.  
  6.    HTTP/1.0 200 Document Follows
  7.    MIME-version: 1.0
  8.    ...
  9.    <error happens here>
  10.  
  11. Right now I just sort of barf some HTML at the client, that includes an
  12. error message, and hope it does the right thing (you might be in the middle
  13. of a header or something).
  14.  
  15. I know that in general this isn't a big problem (the user figures out
  16. something went wrong soon enough) but it seems like we should be able to
  17. do this a little cleaner.
  18.  
  19. I was thinking about something like <ERROR>...</ERROR>, which could then
  20. contain relevant facts about the error and local problem reporting
  21. procedures if it was a server error.  Clever clients would move the
  22. error to the top and keep all other data intact just in case it's useful
  23. in spite of the error.
  24.  
  25. You might even use </BODY><ERROR>...</ERROR> so that clients could
  26. resync on the </BODY> in case they are inside of a <H1> or something,
  27. this might make the parser a little easier.
  28.  
  29. Comments?
  30.  
  31. --sanders
  32.  
  33.